package com.example.seckill.common;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum CodeMsg {
    SUCCESS(0, "success"),
    SERVER_ERROR(500100, "服务端异常"),
    PARAM_ERROR(500101, "参数错误"),
    DB_ERROR(500102, "数据库异常"),
    MQ_ERROR(500103, "消息队列异常"),
    REDIS_ERROR(500104, "Redis异常"),
    
    // 业务相关错误码
    GOODS_NOT_EXIST(500201, "商品不存在"),
    SECKILL_OVER(500202, "商品已售罄"),
    REPEATE_SECKILL(500203, "不能重复秒杀"),
    SECKILL_FAIL(500204, "秒杀失败"),
    ORDER_NOT_EXIST(500205, "订单不存在");

    private final int code;
    private final String msg;
} 